/**
 * 响应拦截
 * @param {Object} http 
 */
module.exports = (vm) => {
	uni.$u.http.interceptors.response.use((response) => {
		if (response.data.code === 1) {
			return response.data.data || {}
		} else {
			// vm.$u.toast(response.data.msg)
		}
	}, (response) => {
		return Promise.reject(response)
	})
}
